<div class="layout-2 container">
    <div class="sub-1">
        <?php
        $frontCurrency = $this->frontwebsite()->getFrontCurrency();
        if($frontCurrency and count($frontCurrency)>1) {
            foreach($frontCurrency as $currency_value) {
                if($currency_value['currency_state'] == '0') continue;
                ?>
                <a class="btn <?php  if ($this->frontwebsite()->getFrontDefaultCurrency() == $currency_value['currency_code']) echo 'btn-primary'; else echo 'btn-gray'; ?> " style="cursor: pointer;" href="<?php echo $this->url('shopfront/default/currency-code', array('action'=>'chanageCurrency','code'=>$currency_value['currency_code'])); ?>"><?php echo $currency_value['currency_symbol']; ?></a>
            <?php } } ?>
    </div>
    <div class="sub-2">
        <ul class="nav-x">
            <li class="item down">
                <a href="<?php echo $this->url('fronthome/default'); ?>"><?php echo $this->translate('会员中心'); ?><i class="fa">&#xf107;</i></a>
                <div class="dropdown user-box">
                    <ul class="user-center">
                        <li class="link"><a href="<?php echo $this->url('frontorder/default'); ?>"><?php echo $this->translate('我的订单'); ?></a></li>
                        <li class="link"><a href="<?php echo $this->url('frontfavorites/default'); ?>"><?php echo $this->translate('我的收藏'); ?></a></li>
                        <li class="link"><a href="<?php echo $this->url('fronthome/default', array('action'=>'goodsask')); ?>"><?php echo $this->translate('商品咨询'); ?></a></li>
                        <li class="link"><a href="<?php echo $this->url('frontaddress/default'); ?>"><?php echo $this->translate('收货地址'); ?></a></li>
                        <li class="link"><a href="<?php echo $this->url('fronthome/default', array('action'=>'useredit')); ?>"><?php echo $this->translate('个人资料'); ?></a></li>
                        <li class="link"><a href="<?php echo $this->url('fronthome/default', array('action'=>'userpasswd')); ?>"><?php echo $this->translate('密码修改'); ?></a></li>
                    </ul>
                </div>
            </li>
            <?php if($this->frontwebsite()->websiteInfo('shop_QRcode')) { ?>
                <li class="item split"></li>
                <li class="item down"><a href=""><?php echo $this->translate('手机商城'); ?></a>
                    <div class="dropdown">
                        <img src="<?php echo  $this->basePath($this->frontwebsite()->createQRcode($this->serverUrl().$this->url('mobile/default'), $this->serverUrl().$this->url('mobile/default'), 'shop')); ?>">
                    </div>
                </li>
            <?php } ?>
            <li class="item split"></li>
            <li class="item"><a href="<?php echo $this->url('frontorder/default'); ?>"><?php echo $this->translate('我的订单'); ?></a></li>
            <li class="item split"></li>
            <?php if($this->frontwebsite()->getUserSession('user_id') != '') {  ?>
                <li class="item"><a href="<?php echo $this->url('frontuser/default',array('action'=>'loginout')); ?>"><?php echo $this->translate('退出'); ?></a></li>
            <?php } else { ?>
                <li class="item"><a class="normal" href="<?php echo $this->url('frontuser/default',array('action'=>'login')); ?>"><?php echo $this->translate('登录'); ?></a>/<a class="normal" href="<?php echo $this->url('frontuser/default',array('action'=>'register')); ?>"><?php echo $this->translate('注册'); ?></a></li>
            <?php } ?>
            <?php
            if($this->frontwebsite()->getUserIni('front_other_login_show') == '1' and $this->frontwebsite()->getUserSession('user_id') == '') {
                $otherLoginArray = $this->frontwebsite()->getUserOtherLoginIni();
                if(!empty($otherLoginArray)) {
                    foreach($otherLoginArray as $othKey => $othValue) {
                        if($othValue['login_state'] == 'true') {
                            $othKey = strtolower($othKey);
                            ?>
                            <li class="item"><a href="<?php echo $this->url('frontuser/default',array('action'=>'otherlogin'), array('query'=>array('login_type'=>$othKey))); ?>"><img style="height: 24px;line-height: 24px;padding-top: 5px;" src="<?php echo $this->basePath('public/img/login/'.$othKey.'_login.png'); ?>"></a></li>
                            <?php
                        }
                    }
                }
            }
            ?>
            <?php if($this->frontwebsite()->getUserSession('user_id') != '') {  ?>
                <li class="item"><?php echo $this->translate('你好'); ?>:<?php echo $this->escapeHtml($this->frontwebsite()->getUserSession('user_name')); ?></li><?php } ?>
        </ul>
    </div>
</div>